﻿namespace Landpy.CruiseControlNet.ConfigurationSidekick.ConfigTreeModule
{
    static class ChildrenNodeProcessChain
    {
        public static IUpdateChildrenNode GetChain()
        {
            IUpdateChildrenNode cruiseControlHandler = new CruiseControlHandler();
            IUpdateChildrenNode internalSecurityHandler = new InternalSecurityHandler();
            IUpdateChildrenNode rolePermissionUserHandler = new RolePermissionUserHandler();
            IUpdateChildrenNode projectHandler = new ProjectHandler();
            IUpdateChildrenNode projectSecurityHandler = new ProjectSecurityHandler();
            IUpdateChildrenNode nunitHandler = new NUnitHandler();
            IUpdateChildrenNode emailHandler = new EmailHandler();
            IUpdateChildrenNode groupHandler = new GroupHandler();
            IUpdateChildrenNode unknowHandler = new UnknowHandler();
            cruiseControlHandler.Successor = internalSecurityHandler;
            internalSecurityHandler.Successor = rolePermissionUserHandler;
            rolePermissionUserHandler.Successor = projectHandler;
            projectHandler.Successor = projectSecurityHandler;
            projectSecurityHandler.Successor = nunitHandler;
            nunitHandler.Successor = emailHandler;
            emailHandler.Successor = groupHandler;
            groupHandler.Successor = unknowHandler;
            return cruiseControlHandler;
        }
    }
}
